<?php

/**
 * Extended Language Library
 *  
 * @version		  0.1
 * @last_update September 10, 2007 
 * @package		  CodeIgniter
 * @subpackage	Extended Language Library
 * @category    Extended Core
 * @author		  Tim Wood [codearachnid]
 * @link		    http://code.codearachnid.com
 *
 */

class MY_Language extends CI_Language {

	function MY_Language() {}
	
	/**
  * Fetch a line of text from the language array and replace blanks
  *
  * @access    public
  * @param    string    the language line
  * @param    string    the replace string
  * @return    string
  */
  function line($line, $replace = null)
  {
      if (is_null($line) || !isset($this->language[$line])) return;
      
      if (is_null($replace)) {
          $retval = $this->language[$line];
      } else {
          if (is_array($replace)) {
              $retval = vsprintf($this->language[$line], $replace);
          } else {
              $retval = sprintf($this->language[$line],  $replace);
          }
      }
      
      return $retval;
  } 
	
}

?>
